<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <from>
        <h2>01</h2>
        <h2>02</h2>
        <h2>03</h2>
        <h2>04</h2>
        <h2>05</h2>
        <h2>06</h2>
        <h2>07</h2>
        <h2>08</h2>
        <h2>09</h2>
        <h2>10</h2>
    </from>
</body>
<script>
    // debugger;
    // for(var i=1;i<=100;i++){
    //     var li = document.createElement("li");
    //     li.textContent = `这是第${i}个li`;
    //     document.body.appendChild(li);
    // }

    var frg = document.createDocumentFragment();
    for (var i = 1; i <= 100; i++) {
        var li = document.createElement("li");
        li.textContent = `这是第${i}个li`;
        frg.appendChild(li);
    }
    debugger;
    document.body.appendChild(frg);


</script>

</html>